Skip to content

Commit

Permalink
Release v2.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sco1 committed Apr 1, 2021
2 parents 8b28fe6 + 1a612d3 commit fca2266
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 78 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog
Versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html) (`<major>`.`<minor>`.`<patch>`)

## [v2.6.2]
### Fixed
* #107, #108 Change incorrect column index yielded for return annotation errors.

## [v2.6.1]
### Changed
* Remove the explicitly pinned minor version ceiling for flake8.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You can verify it's being picked up by invoking the following in your shell:

```bash
$ flake8 --version
3.9.0 (flake8-annotations: 2.6.1, mccabe: 0.6.1, pycodestyle: 2.7.0, pyflakes: 2.3.0) CPython 3.9.1 on Darwin
3.9.0 (flake8-annotations: 2.6.2, mccabe: 0.6.1, pycodestyle: 2.7.0, pyflakes: 2.3.0) CPython 3.9.1 on Darwin
```

## Table of Warnings
Expand Down
6 changes: 3 additions & 3 deletions flake8_annotations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

PY_GTE_38 = False

__version__ = "2.6.1"
__version__ = "2.6.2"

# The order of AST_ARG_TYPES must match Python's grammar
# See: https://docs.python.org/3/library/ast.html#abstract-grammar
Expand Down Expand Up @@ -350,7 +350,7 @@ def colon_seeker(node: AST_FUNCTION_TYPES, lines: List[str]) -> Tuple[int, int]:

# Use str.rfind() to account for annotations on the same line, definition closure should
# be the last : on the line
def_end_col_offset = lines[def_end_lineno - 1].rfind(":") + 1
def_end_col_offset = lines[def_end_lineno - 1].rfind(":")

return def_end_lineno, def_end_col_offset

Expand All @@ -359,7 +359,7 @@ def _single_line_colon_seeker(node: AST_FUNCTION_TYPES, line: str) -> Tuple[int,
"""Locate the closing colon for a single-line function definition."""
col_start = node.col_offset
col_end = node.body[0].col_offset
def_end_col_offset = line.rfind(":", col_start, col_end) + 1
def_end_col_offset = line.rfind(":", col_start, col_end)

return node.lineno, def_end_col_offset

Expand Down
120 changes: 60 additions & 60 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flake8-annotations"
version = "2.6.1"
version = "2.6.2"
description = "Flake8 Type Annotation Checks"
license = "MIT"
readme = "README.md"
Expand Down
Loading

0 comments on commit fca2266

Please sign in to comment.