Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type hints & misc smaller fixes #2976

Merged
merged 5 commits into from
Jul 10, 2023
Merged

Conversation

dcermak
Copy link
Contributor

@dcermak dcermak commented Jun 21, 2023

No description provided.

@Vogtinator
Copy link
Member

IMO it's a bit weird to convert only one of the namedtuples

@codecov-commenter
Copy link

codecov-commenter commented Jun 21, 2023

Codecov Report

Patch coverage: 96.96% and project coverage change: +0.14 🎉

Comparison is base (d0aaa85) 28.22% compared to head (3b26e32) 28.36%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2976      +/-   ##
==========================================
+ Coverage   28.22%   28.36%   +0.14%     
==========================================
  Files          85       85              
  Lines       14634    14664      +30     
==========================================
+ Hits         4131     4160      +29     
- Misses      10503    10504       +1     
Impacted Files Coverage Δ
ReviewBot.py 64.51% <94.44%> (+0.54%) ⬆️
osclib/comments.py 95.77% <95.45%> (-0.38%) ⬇️
check_source.py 71.21% <100.00%> (+0.05%) ⬆️
origin-manager.py 86.62% <100.00%> (+0.08%) ⬆️
osclib/conf.py 96.92% <100.00%> (+0.04%) ⬆️
osclib/core.py 59.53% <100.00%> (ø)
osclib/origin.py 74.09% <100.00%> (+0.21%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dcermak
Copy link
Contributor Author

dcermak commented Jun 21, 2023

IMO it's a bit weird to convert only one of the namedtuples

That's the one I cared about 🤷

@dcermak dcermak force-pushed the type-hints branch 2 times, most recently from e4de8b9 to aa35b9d Compare June 21, 2023 20:23
@Vogtinator
Copy link
Member

./osclib/origin.py:4:1: F401 'typing.Generator' imported but unused
./osclib/origin.py:4:1: F401 'typing.Tuple' imported but unused

@dcermak dcermak force-pushed the type-hints branch 2 times, most recently from afe528f to ba38c7d Compare June 22, 2023 15:42
osclib/comments.py Outdated Show resolved Hide resolved
@dcermak
Copy link
Contributor Author

dcermak commented Jun 23, 2023 via email

Copy link
Member

@Vogtinator Vogtinator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but let's merge on a less read-only day of the week.

@dirkmueller
Copy link
Member

@dcermak rebase please

@dcermak
Copy link
Contributor Author

dcermak commented Jun 29, 2023

Done

@Vogtinator Vogtinator merged commit 395857d into openSUSE:master Jul 10, 2023
6 checks passed
@fcrozat
Copy link
Contributor

fcrozat commented Jul 11, 2023

as mentioned on slack, it broke check_tags_in_requests.py:

script-executor] Script written into '/go/pipelines/Run.Changelog.Checker/5497b97e-9b94-4d20-ad65-d1aaee788380.sh'.
check_tags_in_requests.py: option --review-mode: invalid choice: 'accept-onpass' (choose from <ReviewChoices.NORMAL: 'normal'>, <ReviewChoices.NO: 'no'>, <ReviewChoices.ACCEPT: 'accept'>, <ReviewChoices.ACCEPT_ONPASS: 'accept-onpass'>, <ReviewChoices.FALLBACK_ONFAIL: 'fallback-onfail'>, <ReviewChoices.FALLBACK_ALWAYS: 'fallback-always'>)
Try 'check_tags_in_requests.py help' for info.
[script-executor] Script completed with exit code: 1.

@dcermak dcermak deleted the type-hints branch July 11, 2023 09:25
@DimStar77
Copy link
Contributor

For reference: this no longer works with osc 0.182.1 from Leap

@dcermak
Copy link
Contributor Author

dcermak commented Aug 2, 2023

For reference: this no longer works with osc 0.182.1 from Leap

also with #2990?

@DimStar77
Copy link
Contributor

For reference: this no longer works with osc 0.182.1 from Leap

also with #2990?

Tested with today's HEAD aka 82c067d

@DimStar77
Copy link
Contributor

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/osc/commandline.py", line 9583, in _load_plugins
    mod = imp.load_source(modname, os.path.join(plugin_dir, extfile))
  File "/usr/lib64/python3.6/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 684, in _load
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/dimstar/.osc-plugins/osc-staging.py", line 17, in <module>
    from osclib.accept_command import AcceptCommand
  File "/home/dimstar/.osc-plugins/osclib/accept_command.py", line 11, in <module>
    from osclib.core import attribute_value_save, attribute_value_load
  File "/home/dimstar/.osc-plugins/osclib/core.py", line 20, in <module>
    from osc.connection import http_DELETE
ModuleNotFoundError: No module named 'osc.connection'

/home/dimstar/.osc-plugins/osc-staging.py: No module named 'osc.connection'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants