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 wrong/incompatible types, code readability #884

Merged
merged 5 commits into from
Dec 7, 2023
Merged

Conversation

bact
Copy link
Member

@bact bact commented Dec 7, 2023

  • Trie cannot be None, change to Trie([])
    • not Trie([]) is True and can be used to test if a custom_dict is given
  • Iterable cannot be None, change to []`
    • not [] is True and can be used to test if a custom_dict is given
  • Make Trie an Iterable
  • General formatting and imports sorting
  • Make variables more readable
  • Update docstrings
  • Add SPDX license info

- `Trie` cannot be `None`, change to `Trie([])`
  - `not Trie([])` is `True` and can be used to test if a `custom_dict` is given
- `Iterable` cannot be `None, change to `[]`
  - `not []` is `True` and can be used to test if a `custom_dict` is given
- Make `Trie` an `Iterable`
- General formatting and imports sorting
- Add SPDX license info
@bact bact added bug bugs in the library documentation improve documentation and test cases refactoring a technical improvement which does not add any new features or change existing features. labels Dec 7, 2023
@bact bact added this to the 5.0 milestone Dec 7, 2023
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@pep8speaks
Copy link

pep8speaks commented Dec 7, 2023

Hello @bact! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 104:32: E203 whitespace before ':'

Line 79:5: W503 line break before binary operator
Line 80:5: W503 line break before binary operator
Line 81:5: W503 line break before binary operator

Line 61:21: W503 line break before binary operator
Line 64:21: W503 line break before binary operator

Line 121:21: W503 line break before binary operator
Line 122:21: W503 line break before binary operator
Line 123:21: W503 line break before binary operator

Comment last updated at 2023-12-07 12:53:55 UTC

Copy link

sonarcloud bot commented Dec 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@bact bact merged commit 2015804 into PyThaiNLP:dev Dec 7, 2023
6 of 12 checks passed
@coveralls
Copy link

coveralls commented Dec 7, 2023

Coverage Status

coverage: 84.089% (-0.08%) from 84.168%
when pulling c098749 on bact:dev
into bf61884 on PyThaiNLP:dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs in the library documentation improve documentation and test cases refactoring a technical improvement which does not add any new features or change existing features.
Projects
PyThaiNLP
  
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

3 participants