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

fix(tools): correct potentially unbound return for line_and_column #1181

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

Nytelife26
Copy link
Member

This relates to...

The line_and_columns function of proselint/tools.py.

Rationale

The return type of this function is currently potentially unbound. As a result
of this, Python and various ecosystem tools are unable to determine its return
type accurately, even though we know it will never return an unbound.

Changes

  • perf: prefer incrementation to enumeration
  • fix(tools): correct return type for line_and_columns

Features

N/A.

Bug Fixes

N/A.

Breaking Changes and Deprecations

N/A.

@Nytelife26 Nytelife26 requested a review from suchow as a code owner June 24, 2021 15:08
@Nytelife26 Nytelife26 added bug: confirmed Bugs that were confirmed in triage. cat: maintenance Issues and PRs related to the maintenance of a module. priority: medium Issues and PRs that should be resolved soon. status: review-ready PRs that are ready for author review. type: fix Issues and PRs related to bugs. version: patch Issues and PRs with bug fixes belonging to the next patch release. labels Jun 24, 2021
@codecov
Copy link

codecov bot commented Jun 24, 2021

Codecov Report

Merging #1181 (d6eb838) into main (f8e615e) will decrease coverage by 0.05%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1181      +/-   ##
==========================================
- Coverage   90.19%   90.13%   -0.06%     
==========================================
  Files          83       83              
  Lines        1203     1206       +3     
==========================================
+ Hits         1085     1087       +2     
- Misses        118      119       +1     
Flag Coverage Δ
macos-latest 90.13% <66.66%> (-0.06%) ⬇️
py3.6 89.16% <66.66%> (-0.07%) ⬇️
py3.7 89.16% <66.66%> (-0.07%) ⬇️
py3.8 90.13% <66.66%> (-0.06%) ⬇️
py3.9 90.13% <66.66%> (-0.06%) ⬇️
pypypy3 89.16% <66.66%> (-0.07%) ⬇️
ubuntu-latest 90.13% <66.66%> (-0.06%) ⬇️
windows-latest 90.13% <66.66%> (-0.06%) ⬇️

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

Impacted Files Coverage Δ
proselint/tools.py 77.44% <66.66%> (-0.13%) ⬇️

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 f8e615e...d6eb838. Read the comment docs.

@Nytelife26 Nytelife26 merged commit 8b632ef into main Jun 24, 2021
@Nytelife26 Nytelife26 deleted the fix/tools-return-type branch June 24, 2021 23:58
@Nytelife26 Nytelife26 restored the fix/tools-return-type branch August 22, 2021 20:58
@Nytelife26 Nytelife26 deleted the fix/tools-return-type branch August 22, 2021 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed Bugs that were confirmed in triage. cat: maintenance Issues and PRs related to the maintenance of a module. priority: medium Issues and PRs that should be resolved soon. status: review-ready PRs that are ready for author review. type: fix Issues and PRs related to bugs. version: patch Issues and PRs with bug fixes belonging to the next patch release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants