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

Feature: Synapse passing type check #1725

Merged
merged 5 commits into from
Mar 6, 2024

Conversation

gus-opentensor
Copy link
Collaborator

  • bittensor/synapse.py updated to pass type checking
  • mypy.ini uncommented synapse block so that mypy runs type checking against bittensor/synapse.py

Copy link

@wolfentensor wolfentensor left a comment

Choose a reason for hiding this comment

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

The code you've written to check for the presence of None in attributes is clear and functionally sound. This explicit handling demonstrates good defensive programming practices. However, considering maintainability and readability, you might find it beneficial to explore more concise ways to achieve the same functionality. Utilizing Python's ability to handle such checks in a more streamlined manner could reduce verbosity and improve code clarity.

We need to follow PEP 8 styleguide on all code moving forward. The essence of following PEP 8 is not just about adhering to rules for the sake of rules but about writing code that is clean, easy to read, and easy for others to understand and maintain. This will produce high-quality, professional code that stands out in the Python community.

bittensor/synapse.py Show resolved Hide resolved
bittensor/synapse.py Show resolved Hide resolved
bittensor/synapse.py Show resolved Hide resolved
bittensor/synapse.py Show resolved Hide resolved
bittensor/synapse.py Show resolved Hide resolved
Copy link
Contributor

@ifrit98 ifrit98 left a comment

Choose a reason for hiding this comment

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

LGTM!

@ifrit98 ifrit98 merged commit fed333b into staging Mar 6, 2024
12 checks passed
@ifrit98 ifrit98 mentioned this pull request Mar 7, 2024
@gus-opentensor gus-opentensor deleted the feature/gus/51818215/expand-type-checking-synapse branch March 7, 2024 16:34
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

3 participants