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

Sourcery Starbot ⭐ refactored vbuxbaum/lng-api #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sourcery-ai-bot
Copy link

Thanks for starring sourcery-ai/sourcery ✨ 🌟 ✨

Here's your pull request refactoring your most popular Python repo.

If you want Sourcery to refactor all your Python repos and incoming pull requests install our bot.

Review changes via command line

To manually merge these changes, make sure you're on the main branch, then run:

git fetch https://github.com/sourcery-ai-bot/lng-api main
git merge --ff-only FETCH_HEAD
git reset HEAD^

gender_analysis = self.check_gender_neutrality(avoided_expression)
if gender_analysis:
if gender_analysis := self.check_gender_neutrality(avoided_expression):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function TextAnalyzer.check_for_avoided_expression refactored with the following changes:

Comment on lines -46 to +47
result = this_prefix + " " + result
result = f"{this_prefix} {result}"
if self.__analyze_sufix(this_sufix):
result = result + " " + this_sufix
result = f"{result} {this_sufix}"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function TextAnalyzer.check_gender_neutrality refactored with the following changes:

Comment on lines -59 to +60
and not self.pos_tags.get(this_sufix, "") == "V"
and not self.pos_tags.get(this_sufix, "") == "PROPESS"
and not self.pos_tags.get(this_sufix, "") == "ART"
and self.pos_tags.get(this_sufix, "") != "V"
and self.pos_tags.get(this_sufix, "") != "PROPESS"
and self.pos_tags.get(this_sufix, "") != "ART"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function TextAnalyzer.__analyze_sufix refactored with the following changes:

  • Simplify logical expression using De Morgan identities [×3] (de-morgan)

Comment on lines -68 to +67
and not self.pos_tags.get(this_prefix, "") == "V"
and self.pos_tags.get(this_prefix, "") != "V"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function TextAnalyzer.__analyze_prefix refactored with the following changes:

  • Simplify logical expression using De Morgan identities (de-morgan)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant