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

Disallow implicit re-exports of imported values in Python modules #636

Conversation

fpinto-cdd
Copy link
Contributor

@fpinto-cdd fpinto-cdd commented May 7, 2024

  • Set Mypy option no_implicit_reexport to True.
  • Fix errors reported by Mypy after the configuration change.

From https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-no-implicit-reexport:

[…] [do] not re-export unless the item is imported using from-as or is included in __all__.

Ref: https://app.shortcut.com/cordada/story/6589 [sc-6589]

@fpinto-cdd fpinto-cdd added the task Task or chore label May 7, 2024
@fpinto-cdd fpinto-cdd self-assigned this May 7, 2024
@fpinto-cdd fpinto-cdd requested a review from a team as a code owner May 7, 2024 20:11
@fpinto-cdd fpinto-cdd marked this pull request as draft May 7, 2024 20:16
@fpinto-cdd fpinto-cdd force-pushed the task/disallow-implicit-re-exports-of-imported-values-in-python-modules branch 2 times, most recently from be1d1c2 to 26d9b1a Compare May 7, 2024 22:09
@fpinto-cdd fpinto-cdd marked this pull request as ready for review May 7, 2024 22:09
Copy link

codecov bot commented May 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.00%. Comparing base (a52a17f) to head (cbb5002).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #636      +/-   ##
===========================================
+ Coverage    86.98%   87.00%   +0.01%     
===========================================
  Files           34       34              
  Lines         3013     3016       +3     
  Branches       378      378              
===========================================
+ Hits          2621     2624       +3     
  Misses         250      250              
  Partials       142      142              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/cl_sii/rtc/xml_utils.py Outdated Show resolved Hide resolved
src/cl_sii/rtc/xml_utils.py Outdated Show resolved Hide resolved
src/cl_sii/libs/crypto_utils.py Outdated Show resolved Hide resolved
src/cl_sii/libs/xml_utils.py Outdated Show resolved Hide resolved
src/cl_sii/libs/xml_utils.py Outdated Show resolved Hide resolved
src/cl_sii/libs/xml_utils.py Outdated Show resolved Hide resolved
src/cl_sii/libs/xml_utils.py Outdated Show resolved Hide resolved
@fpinto-cdd fpinto-cdd force-pushed the task/disallow-implicit-re-exports-of-imported-values-in-python-modules branch from 26d9b1a to e6281e6 Compare May 15, 2024 14:19
- Set Mypy option `no_implicit_reexport` to `True`.
- Fix errors reported by Mypy after the configuration change.

From https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-no-implicit-reexport:

> […] [do] not re-export unless the item is imported using from-as or is included in `__all__`.

Ref: https://app.shortcut.com/cordada/story/6589 [sc-6589]
@fpinto-cdd fpinto-cdd force-pushed the task/disallow-implicit-re-exports-of-imported-values-in-python-modules branch from e6281e6 to cbb5002 Compare May 15, 2024 14:20
Copy link

sonarcloud bot commented May 15, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@fpinto-cdd fpinto-cdd merged commit 2df3616 into develop May 15, 2024
21 checks passed
@fpinto-cdd fpinto-cdd deleted the task/disallow-implicit-re-exports-of-imported-values-in-python-modules branch May 15, 2024 15:29
This was referenced May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task Task or chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants