-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from OpenZeppelin/onboard-ruff
Onboard `ruff`
- Loading branch information
Showing
13 changed files
with
120 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Changelog | ||
|
||
- [0.0.4](#004) | ||
|
||
## 0.0.4 | ||
|
||
### [Fix incorrect state mutability identification](https://github.com/OpenZeppelin/sgp/pull/9) | ||
|
||
This PR fixed incorrect state mutability identification for the various structures, such as: | ||
|
||
**`const` state mutability for the state variable declaration** | ||
|
||
```solidity | ||
contract Example { | ||
uint256 constant x = 1; | ||
} | ||
``` | ||
|
||
**`payable` state mutability for the function return parameter variable declaration** | ||
|
||
```solidity | ||
function test() public returns(address payable) {} | ||
``` | ||
|
||
Now, these cases are handled correctly after the bug in the version `0.0.3`. | ||
|
||
### [CHANGELOG.md](/CHANGELOG.md) added | ||
|
||
### [Onboard `ruff](https://github.com/OpenZeppelin/sgp/pull/10) | ||
|
||
- Use `ruff` for the `py` files check and formatting. | ||
- Added a `ruff_helper.sh` script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" | |
|
||
[project] | ||
name = "openzeppelin-solidity-grammar-parser" | ||
version = "0.0.3" | ||
version = "0.0.4" | ||
authors = [{ name = "Georgii Plotnikov", email = "[email protected]" }] | ||
description = "Solidity ANTLR4 grammar Python parser" | ||
readme = "README.md" | ||
|
@@ -49,3 +49,6 @@ exclude = ''' | |
)/ | ||
) | ||
''' | ||
|
||
[tool.ruff] | ||
exclude = ["./sgp/parser/"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ coverage==7.3.1 | |
simplejson==3.19.1 | ||
typing==3.7.4.3 | ||
typing_extensions==4.8.0 | ||
ruff==0.2.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
source ./bin/activate | ||
pip install ruff | ||
|
||
ruff check . | ||
ruff format . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters