Skip to content

Commit

Permalink
Merge pull request #18 from 15r10nk/fix_try_star
Browse files Browse the repository at this point in the history
fixed several bugs
  • Loading branch information
15r10nk authored Jan 23, 2024
2 parents 7160031 + 43a2009 commit 4448e41
Show file tree
Hide file tree
Showing 24 changed files with 1,033 additions and 360 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ repos:
- hooks:
- id: black
repo: https://github.com/psf/black
rev: 23.10.1
rev: 23.12.1
- hooks:
- id: blacken-docs
repo: https://github.com/asottile/blacken-docs
rev: 1.16.0

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.11.0
rev: v2.12.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, '2']
Expand All @@ -63,4 +63,4 @@ repos:
stages:
- commit-msg
repo: https://github.com/commitizen-tools/commitizen
rev: 3.12.0
rev: v3.13.0
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
## v0.5.1 (2024-01-23)

### Fix

- add no type_comment when changing AnnAssign to Assign
- **3.8**: ExtSlice can not be nested
- no lambda in annotation scope within class scope
- use None MatchSingleton for invalid match expressions
- do not change the order of MatchClass.kwd_attrs
- correct handling of MatchAs without a name
- MatchSingleton can only be used for None, True or False
- Assign.target needs a minimal length of 1
- AnnAssign can only be simple if the target is a Name
- MatchValue can not be used for None, True or False
- AugAssign requires Store context for target
- TypeAlias.name requires a Store context
- Dict .keys and .values has the same number of elements
- Compare .ops and .comparators has the same number of elementes
- use correct .ctx for nodes
- analyse rest in mapping-pattern as written variable
- **global**: analyse used variables in annotations
- allow only except handler with a type in try-star blocks

### Refactor

- moved unparse to utils

## v0.5.0 (2023-11-29)

### Feat
Expand Down
481 changes: 200 additions & 281 deletions poetry.lock

Large diffs are not rendered by default.

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 = "pysource-codegen"
version = "0.5.0"
version = "0.5.1"
description = ""
authors = ["Your Name <[email protected]>"]
readme = "README.md"
Expand Down
Loading

0 comments on commit 4448e41

Please sign in to comment.