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

phayathaibert, khavee, parse: Code clean up #889

Merged
merged 7 commits into from
Dec 12, 2023
Merged

phayathaibert, khavee, parse: Code clean up #889

merged 7 commits into from
Dec 12, 2023

Conversation

bact
Copy link
Member

@bact bact commented Dec 12, 2023

  • pythainlp.augment.lm.phayathaibert.ThaiTextAugmenter.augment(): Add exception if max num_args is exceeded, also guarantee return if work properly
  • pythainlp.phayathaibert.core.ThaiTextProcessor: Add self to argument of class methods
  • pythainlp.phayathaibert.core.ThaiTextProcessor: toks and pre_rules have to be List[str], not Collection[str] as the order matters.
  • pythainlp.parse.core.dependency_parsing(): model: str can't be None -> change to model: Union[str, None]
  • Khavee: membership test should be X not in, not not X in
  • Khavee: skip McCabe complexity check for now (54 complexity at the moment)

- `pythainlp.augment.lm.phayathaibert.ThaiTextAugmenter.augment()`: Add exception if max num_args is exceeded, also guarantee return if work properly
- `Khavee`: skip McCabe complexity check for now (54 complexity at the moment)
- `pythainlp.parse.core.dependency_parsing()`: model: str can't be None
@bact bact added the refactoring a technical improvement which does not add any new features or change existing features. label Dec 12, 2023
@bact bact added this to the 5.0 milestone Dec 12, 2023
@pep8speaks
Copy link

pep8speaks commented Dec 12, 2023

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

Line 231:13: W503 line break before binary operator
Line 232:13: W503 line break before binary operator
Line 233:13: W503 line break before binary operator
Line 238:13: W503 line break before binary operator
Line 239:13: W503 line break before binary operator
Line 327:13: W503 line break before binary operator
Line 329:17: W503 line break before binary operator
Line 345:13: W503 line break before binary operator
Line 397:29: W503 line break before binary operator
Line 398:29: W503 line break before binary operator
Line 399:29: W503 line break before binary operator
Line 419:21: W503 line break before binary operator
Line 420:21: W503 line break before binary operator
Line 421:21: W503 line break before binary operator
Line 422:21: W503 line break before binary operator
Line 437:33: W503 line break before binary operator
Line 443:33: W503 line break before binary operator
Line 444:33: W503 line break before binary operator
Line 454:33: W503 line break before binary operator
Line 460:33: W503 line break before binary operator
Line 461:33: W503 line break before binary operator
Line 473:37: W503 line break before binary operator
Line 479:37: W503 line break before binary operator
Line 480:37: W503 line break before binary operator
Line 503:29: W503 line break before binary operator
Line 504:29: W503 line break before binary operator
Line 505:29: W503 line break before binary operator
Line 518:21: W503 line break before binary operator
Line 519:21: W503 line break before binary operator
Line 520:21: W503 line break before binary operator
Line 521:21: W503 line break before binary operator
Line 536:33: W503 line break before binary operator
Line 542:33: W503 line break before binary operator
Line 543:33: W503 line break before binary operator
Line 553:33: W503 line break before binary operator
Line 559:33: W503 line break before binary operator
Line 560:33: W503 line break before binary operator
Line 572:37: W503 line break before binary operator
Line 578:37: W503 line break before binary operator
Line 579:37: W503 line break before binary operator

Line 36:62: E203 whitespace before ':'
Line 64:17: W503 line break before binary operator
Line 113:21: W503 line break before binary operator

Line 416:21: W503 line break before binary operator
Line 417:21: W503 line break before binary operator
Line 418:21: W503 line break before binary operator
Line 423:21: W503 line break before binary operator
Line 424:21: W503 line break before binary operator
Line 425:21: W503 line break before binary operator

Comment last updated at 2023-12-12 08:18:19 UTC

@coveralls
Copy link

coveralls commented Dec 12, 2023

Coverage Status

coverage: 85.505% (+0.004%) from 85.501%
when pulling de1a1bc on bact:dev
into ff74b39 on PyThaiNLP:dev.

@bact bact added the bug bugs in the library label Dec 12, 2023
Copy link

sonarcloud bot commented Dec 12, 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 3b6daf0 into PyThaiNLP:dev Dec 12, 2023
11 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs in the library refactoring a technical improvement which does not add any new features or change existing features.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants