-
Notifications
You must be signed in to change notification settings - Fork 202
Type annotate everywhere Network is used #575
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -1,6 +1,11 @@ | ||||||||
from __future__ import annotations | ||||||||
|
||||||||
import struct | ||||||||
import time | ||||||||
from typing import Optional | ||||||||
from typing import Optional, TYPE_CHECKING | ||||||||
|
||||||||
if TYPE_CHECKING: | ||||||||
import canopen.network | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The following code is not a class so it's strictly not needed to have two lines according to black. Is your preference to always have two spaces below imports? (PS! Can I encourage you to write a coding guideline document? It certainly would lessen your need to review and comment on styling.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes. Sorry I won't have much time to invest for documentation in the coming weeks I'm afraid. Hope it gets better soon. |
||||||||
|
||||||||
|
||||||||
# 1 Jan 1984 | ||||||||
|
@@ -17,7 +22,7 @@ | |||||||
#: COB-ID of the SYNC message | ||||||||
cob_id = 0x100 | ||||||||
|
||||||||
def __init__(self, network): | ||||||||
def __init__(self, network: canopen.network.Network): | ||||||||
self.network = network | ||||||||
|
||||||||
def transmit(self, timestamp: Optional[float] = None): | ||||||||
|
Uh oh!
There was an error while loading. Please reload this page.