- Oct 18, 2024
-
-
Newbyte authored
This also effectively reverts 7d068e20, because now we actually use the version for something in the program. It also avoids the problems reported in postmarketOS/mrhlpr#15 to the best of my knowledge — I tried reproducing the bug as written in there and did not get any build failures. The primary purpose of this version command is for making experimentation with mypyc easier, but I also can imagine it might be nice for users to be able to get their version of mrtest easily.
-
- Oct 14, 2024
-
-
Newbyte authored
None of the code paths actually make use of the case where it returns None for anything other than displaying the same error message, if they display one at all. Some just attempted to use None as if it was an integer. As such, just display the error in mr.checked_out() to simplify and deduplicate code.
-
Newbyte authored
Mostly for fun. Not sure if there's any real practical benefit. It might be useful for pmbootstrap later, but adopting it to be compatible with mypyc would likely be more work, so I'm using this as a playground to learn how it works.
-
- Oct 10, 2024
-
-
Newbyte authored
mypyc doesn't understand the ellipsis in this context: mrhlpr/mr.py:177: error: Unsupported statement in class body And they've functionally the same anyway, so just work around it like this.
-
Newbyte authored
This way we're even stricter with missing types. Let's activate it so we don't regress.
-
Newbyte authored
-
Newbyte authored
This should never happen, so we can simplify the function signature by typing it like this.
-
Newbyte authored
frontend.main() only ever returns None, so there's no point in calling sys.exit with its return value as parameter.
-
Pablo Correa Gomez authored
-
- Oct 07, 2024
-
-
Oliver Smith authored
-
- Sep 28, 2024
-
-
Newbyte authored
This is useful to test how apk actually will behave when upgrading.
-
- Sep 27, 2024
-
-
Newbyte authored
It makes no sense to allow None here given that the first usage of origin is accessing a property of it with the dot operator, an operation which would be guaranteed to fail on a None value.
-
- Sep 23, 2024
-
-
Robert Eckelmann authored
Signed-off-by:
Robert Eckelmann <longnoserob@gmail.com>
-
- Sep 14, 2024
-
-
Fixes #21
-
- Aug 17, 2024
-
-
Newbyte authored
-
- Aug 06, 2024
-
-
Pablo Correa Gomez authored
-
- Jul 11, 2024
-
-
Oliver Smith authored
With more modern packaging methods, the executable flag gets stripped from the files in data. Adjust mr.py to run the scripts with python3 explicitly, doing it like that is actually better than having these scripts that are not meant to be executed directly with the executable flag on the filesystem. Fixes: issue 20
-
- Jun 27, 2024
-
-
Pablo Correa Gomez authored
-
- Jun 04, 2024
-
-
Fixes #15
-
This is unnecessary, because the code does not use the version. And setuptools was getting very confused with "mrhlpr.version", as it is importing the top-level mrhlpr.py file, and failing to import the module.
-
- Jun 03, 2024
-
-
Fixes #17
-
- May 28, 2024
-
-
Pablo Correa Gomez authored
As it will fail, and that's annoying! Fixes #18
-
- May 20, 2024
-
-
Newbyte authored
Some are still missing, but it's a start.
-
Newbyte authored
mypy cannot find these as they're defined in __init__.py: $ mypy mrtest.py mrhlpr.py --check-untyped-defs mrtest/zap_packages.py:36: error: Module has no attribute "is_root_user" [attr-defined] mrtest/zap_packages.py:37: error: Module has no attribute "get_sudo" [attr-defined] mrtest/add_packages.py:60: error: Module has no attribute "get_virtual_group" [attr-defined] mrtest/add_packages.py:63: error: Module has no attribute "is_root_user" [attr-defined] mrtest/add_packages.py:64: error: Module has no attribute "get_sudo" [attr-defined]
-
Newbyte authored
-
Newbyte authored
-
Newbyte authored
This confuses mypy as bytes.decode() returns a str and subprocess.run(...).stdout returns a bytes object. While it would be possible to type output as being a Union[bytes, str], these are really two distinct purposes and I think just renaming the first use of output to output_raw helps make the code clearer anyway.
-
- May 09, 2024
-
-
Newbyte authored
Even with the 5 second sleep, it sometimes seems to fail at setting auto merge, and instead raises GitlabMRClosedError for some reason. As such, retry up to 3 times with a 5 second sleep in-between, which seems to be more robust from my testing.
-
Newbyte authored
-
Newbyte authored
While I understand the intent behind the original message, I always end up reading it as that providing a thank you comment is discouraged. While I think the intended meaning is obvious if you think about it, to me writing it this way feels like a better way to communicate it.
-
Newbyte authored
In some cases you may not want to approve an MR but still merge it. For example, if it's your own MR. Even if automatic detection of self-merging later is implemented, there may still be instances where you wish to merge an MR without approving it, for example if an MR you don't understand well enough to feel confident merging already has enough approvals for a merge.
-
- May 06, 2024
-
-
Newbyte authored
Previously you'd just get an error that GITLAB_TOKEN wasn't set in the environment without any information about how to resolve this.
-
- Apr 30, 2024
-
-
Newbyte authored
py3-gitlab is now in community: https://gitlab.alpinelinux.org/alpine/aports/-/commit/b470cf0780124804e17ce7510418b77640a42b0b
-
- Apr 24, 2024
-
-
Pablo Correa Gómez authored
[ci:skip-build]: already built successfully in CI
-
Pablo Correa Gomez authored
-
- Apr 10, 2024
-
-
Newbyte authored
Ruff will recursively lint all files in subdirectories if no list of files is omitted. This also lets us remove the ShellCheck ignore as the affected code no longer exist. [ci:skip-build]: already built successfully in CI
-
Newbyte authored
If the list of files is omitted, Ruff will check all files recursively. Use --diff to get a diff of what's not complicit instead of applying the changes directly.
-
Newbyte authored
-