tchar / ulauncher-albert-calculate-anything

A ULauncher/Albert extension that supports currency, units and date time conversion, as well as a calculator that supports complex numbers and functions.
MIT License
103 stars 13 forks source link

Code refactoring and typing #22

Closed tchar closed 3 years ago

tchar commented 3 years ago

Move calculate_anything/calculation/calculation.py -> calculate_anything/calculation/calculator.py Move calculate_anything/query/multi_handler.py -> calculate_anything/query/handlers/multi_handler.py Move calculate_anything/test/calculation/test_calculation.py -> calculate_anything/test/calculation/test_calculator.py

Add calculate_anything/time/data.py with typing for Cities

Rename calculate_anything.calculation.base._Calculation to Calculation Rename calculate_anything.calculation.calculation.Calculation to CalculatorCalculation

Introduce calculate_anything.calculation.base.CalculationError

Add typing to every method, function, property

codecov[bot] commented 3 years ago

Codecov Report

Merging #22 (76ecb97) into master (286c742) will decrease coverage by 0.13561%. The diff coverage is 97.04918%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##              master         #22         +/-   ##
===================================================
- Coverage   95.26565%   95.13004%   -0.13561%     
===================================================
  Files             55          56          +1     
  Lines           3802        3922        +120     
===================================================
+ Hits            3622        3731        +109     
- Misses           180         191         +11     
Flag Coverage Δ
unittests 95.13004% <97.04918%> (-0.13561%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
calculate_anything/lang.py 100.00000% <ø> (ø)
calculate_anything/regex.py 100.00000% <ø> (ø)
calculate_anything/currency/cache.py 67.39130% <74.19355%> (-0.84400%) :arrow_down:
...ything/currency/providers/european_central_bank.py 95.23810% <90.47619%> (-2.02218%) :arrow_down:
calculate_anything/calculation/units.py 70.52023% <91.30435%> (-0.48570%) :arrow_down:
calculate_anything/time/service.py 87.30159% <92.30769%> (-0.62945%) :arrow_down:
calculate_anything/query/handlers/base_n.py 89.54248% <95.00000%> (+0.65358%) :arrow_up:
calculate_anything/currency/providers/base.py 97.05882% <95.23810%> (-1.21704%) :arrow_down:
calculate_anything/utils/loaders/json.py 99.24242% <95.65217%> (-0.75759%) :arrow_down:
calculate_anything/calculation/base.py 98.41270% <97.56098%> (-1.58730%) :arrow_down:
... and 36 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 9f72756...76ecb97. Read the comment docs.