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

Update codebase to modern typing syntax #427

Merged
merged 3 commits into from
Mar 25, 2022
Merged

Update codebase to modern typing syntax #427

merged 3 commits into from
Mar 25, 2022

Conversation

abey79
Copy link
Owner

@abey79 abey79 commented Mar 25, 2022

Description

By using from __future__ import annotations, modern typing syntax may be used in a code base intended to run on older python version. This PR systematically adds this statement and comprehensively updates the typing syntax thanks to pyupgrade.

Checklist

  • feature/fix implemented
  • code formatting ok (black and isort)
  • mypy returns no error
  • tests added/updated and pytest succeeds
  • documentation added/updated
    • command docstring and option/argument help
    • README.md updated (Feature Overview)
    • CHANGELOG.md updated
    • added new command to reference.rst
    • RTD doc updated and building with no error (make clean && make html in docs/)

abey79 added 3 commits March 25, 2022 16:06
- fixed error in _utils.py
- renamed function in conftest.py
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Mar 25, 2022

Codecov Report

Merging #427 (80a7949) into master (2964c17) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #427      +/-   ##
==========================================
+ Coverage   93.78%   93.83%   +0.05%     
==========================================
  Files          59       59              
  Lines        5165     5210      +45     
  Branches      766      766              
==========================================
+ Hits         4844     4889      +45     
  Misses        205      205              
  Partials      116      116              
Impacted Files Coverage Δ
tests/conftest.py 83.33% <100.00%> (+0.18%) ⬆️
tests/test_benchmarks.py 93.75% <100.00%> (+0.20%) ⬆️
tests/test_command_files.py 100.00% <100.00%> (ø)
tests/test_commands.py 99.02% <100.00%> (+<0.01%) ⬆️
tests/test_config.py 100.00% <100.00%> (ø)
tests/test_files.py 98.77% <100.00%> (ø)
tests/test_geometry.py 100.00% <100.00%> (ø)
tests/test_hpgl.py 100.00% <100.00%> (ø)
tests/test_layers.py 100.00% <100.00%> (ø)
tests/test_line_index.py 100.00% <100.00%> (ø)
... and 46 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2964c17...80a7949. Read the comment docs.

@abey79 abey79 merged commit 10d88dc into master Mar 25, 2022
@abey79 abey79 deleted the update-typing branch March 25, 2022 16:39
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.

1 participant