Skip to content

fix: replace == None/!= True with is None/is not True (Python anti-pa…#113

Open
Jah-yee wants to merge 1 commit intoEverMind-AI:mainfrom
Jah-yee:fix/is-latest-bool-comparison
Open

fix: replace == None/!= True with is None/is not True (Python anti-pa…#113
Jah-yee wants to merge 1 commit intoEverMind-AI:mainfrom
Jah-yee:fix/is-latest-bool-comparison

Conversation

@Jah-yee
Copy link

@Jah-yee Jah-yee commented Mar 5, 2026

  • Fixed 3 instances of '!= True' to 'is not True' in repository files
  • Fixed 3 instances of '== None' to 'is None' in mem_memorize.py

Using == or != with boolean/None values is a Python anti-pattern. The correct way is to use 'is' or 'is not' for identity comparisons.

Description

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test improvements
  • Build/CI/CD changes

Related Issues

Fixes #
Relates to #

Changes Made

Testing

  • Tested locally with manual verification
  • Added/updated unit tests
  • Added/updated integration tests
  • All existing tests pass

Test Configuration:

  • OS:
  • Python version:
  • Database versions (if relevant):

Test Results:

# Paste relevant test output here

Checklist

  • My code follows the project's code style guidelines
  • I have performed a self-review of my code
  • I have commented my code where necessary, particularly in complex areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have used Gitmoji in my commit messages
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Additional Notes

Breaking Changes


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…tterns)

- Fixed 3 instances of '!= True' to 'is not True' in repository files
- Fixed 3 instances of '== None' to 'is None' in mem_memorize.py

Using == or != with boolean/None values is a Python anti-pattern.
The correct way is to use 'is' or 'is not' for identity comparisons.
Jah-yee pushed a commit to Jah-yee/EverMemOS that referenced this pull request Mar 10, 2026
… replace bare except

- Rename stage3_memory_retrivel.py to stage3_memory_retrieval.py (typo fix)
- Replace == None with is None in mem_memorize.py and test files
- Replace != True with is not True in repository files
- Replace bare except with except Exception in production and test files

Fixes EverMind-AI#115 EverMind-AI#113 EverMind-AI#107 EverMind-AI#91 EverMind-AI#98
Jah-yee pushed a commit to Jah-yee/EverMemOS that referenced this pull request Mar 12, 2026
- Rename stage3_memory_retrivel.py to stage3_memory_retrieval.py (typo fix)
- Replace == None with is None (Python anti-pattern)
- Replace != True with is not True (Python anti-pattern)
- Replace bare except with except Exception
- Remove duplicate 'rrf' entry in docstring
- Remove unused MongoDB init script volume mount from docker-compose.yaml
- Add missing env template setup step in STARTER_KIT.md quick start

Fixes: EverMind-AI#115, EverMind-AI#113, EverMind-AI#107, EverMind-AI#97, EverMind-AI#91, EverMind-AI#90, EverMind-AI#86
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.

1 participant