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

refactor: remove deprecated typing uses and add custom linter script #699

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

jansegre
Copy link
Member

Motivation

I noticed some uses of typing.Set in the code, even after we removing those, because there's no linter it's very easy to forget we can use set instead.

Acceptance Criteria

  • add custom linter script to check for deprecated uses of typing

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@jansegre jansegre self-assigned this Jul 12, 2023
@jansegre jansegre requested a review from msbrogli as a code owner July 12, 2023 17:39
@jansegre jansegre force-pushed the refactor/no-builtin-random branch from cdb4777 to a39864a Compare July 12, 2023 18:09
@jansegre jansegre force-pushed the refactor/no-deprecated-typing branch from c21d77d to 85d96fa Compare July 12, 2023 18:14
@jansegre jansegre requested a review from glevco July 12, 2023 18:17
glevco
glevco previously approved these changes Jul 12, 2023
@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #699 (acb0972) into master (3695ad2) will increase coverage by 0.09%.
The diff coverage is 100.00%.

❗ Current head acb0972 differs from pull request most recent head b0672bc. Consider uploading reports for the commit b0672bc to get more accurate results

@@            Coverage Diff             @@
##           master     #699      +/-   ##
==========================================
+ Coverage   84.01%   84.11%   +0.09%     
==========================================
  Files         246      246              
  Lines       20519    20448      -71     
  Branches     2769     2760       -9     
==========================================
- Hits        17240    17200      -40     
+ Misses       2706     2674      -32     
- Partials      573      574       +1     
Impacted Files Coverage Δ
hathor/consensus/consensus.py 97.82% <100.00%> (-0.05%) ⬇️
hathor/consensus/context.py 100.00% <100.00%> (ø)
hathor/event/websocket/factory.py 92.85% <100.00%> (ø)
hathor/indexes/memory_mempool_tips_index.py 100.00% <100.00%> (ø)
hathor/indexes/memory_tx_group_index.py 93.93% <100.00%> (ø)
hathor/indexes/mempool_tips_index.py 92.38% <100.00%> (ø)
hathor/indexes/tips_index.py 100.00% <100.00%> (ø)
hathor/transaction/storage/cache_storage.py 94.32% <100.00%> (ø)
hathor/websocket/protocol.py 100.00% <100.00%> (ø)

... and 14 files with indirect coverage changes

msbrogli
msbrogli previously approved these changes Jul 12, 2023
@jansegre jansegre force-pushed the refactor/no-builtin-random branch from a39864a to f5c3905 Compare July 12, 2023 19:58
@jansegre jansegre force-pushed the refactor/no-deprecated-typing branch from 85d96fa to acb0972 Compare July 12, 2023 19:59
@jansegre jansegre force-pushed the refactor/no-builtin-random branch 2 times, most recently from 33abcac to ba13778 Compare July 12, 2023 22:27
Base automatically changed from refactor/no-builtin-random to master July 12, 2023 22:56
@jansegre jansegre dismissed stale reviews from msbrogli and glevco July 12, 2023 22:56

The base branch was changed.

@jansegre jansegre force-pushed the refactor/no-deprecated-typing branch from acb0972 to b0672bc Compare July 12, 2023 22:57
@jansegre jansegre merged commit ab215c4 into master Jul 12, 2023
@jansegre jansegre deleted the refactor/no-deprecated-typing branch July 12, 2023 23:06
@jansegre jansegre mentioned this pull request Jul 24, 2023
2 tasks
This was referenced Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants