NameError due tro circular class reference in method parameter type check #7

Closed
opened 2026-01-02 21:43:50 +00:00 by admin · 0 comments
Owner

There is a NameError starting with the declare method defined for class Software herein, wherein the class being made has an attempted reference to itself for type checking purposes. There are likely other examples of this for other intra-class or intra-instance methods or attributes. Fix these NameErrors.

Exception has occurred: NameError
name 'Software' is not defined
  File "/home/rika/Portfolio/Documents/Source_Code/skato-ansible/softman.py", line 88, in Software
    def declare(self, name: str, **kwpaths: Software._SubAppParams) -> Software._AppParams:
                                            ^^^^^^^^
  File "/home/rika/Portfolio/Documents/Source_Code/skato-ansible/softman.py", line 29, in <module>
    # @TODO move below 2 class variables declarations outside of class, but make class variables equal to them
    ...<134 lines>...
    
  File "/home/rika/Portfolio/Documents/Source_Code/skato-ansible/anodes.py", line 12, in <module>
    from softman import Software, SoftPathGroup, SoftScope
NameError: name 'Software' is not defined
There is a `NameError` starting with the `declare` method defined for class `Software` [herein](https://git.sukaato.moe/admin/skato-ansible/src/commit/fa1b1540d9706c67a3e23810edf9ae94955275f1/softman.py#L77), wherein the class being made has an attempted reference to itself for type checking purposes. There are likely other examples of this for other intra-class or intra-instance methods or attributes. Fix these `NameError`s. ```bash Exception has occurred: NameError name 'Software' is not defined File "/home/rika/Portfolio/Documents/Source_Code/skato-ansible/softman.py", line 88, in Software def declare(self, name: str, **kwpaths: Software._SubAppParams) -> Software._AppParams: ^^^^^^^^ File "/home/rika/Portfolio/Documents/Source_Code/skato-ansible/softman.py", line 29, in <module> # @TODO move below 2 class variables declarations outside of class, but make class variables equal to them ...<134 lines>... File "/home/rika/Portfolio/Documents/Source_Code/skato-ansible/anodes.py", line 12, in <module> from softman import Software, SoftPathGroup, SoftScope NameError: name 'Software' is not defined ```
admin added this to the optimal soft-coding milestone 2026-01-02 21:43:50 +00:00
admin added the fix/boundary_bug label 2026-01-02 21:43:50 +00:00
admin self-assigned this 2026-01-02 21:43:50 +00:00
admin added this to the skato-ansible debugging project 2026-01-02 21:43:50 +00:00
admin moved this to High Priority in skato-ansible debugging on 2026-01-02 21:44:11 +00:00
admin started working 2026-01-03 13:29:22 +00:00
admin canceled time tracking 2026-01-03 13:29:30 +00:00
admin started working 2026-01-03 13:29:37 +00:00
admin worked for 23 minutes 2026-01-03 13:52:43 +00:00
admin closed this issue 2026-01-03 13:52:58 +00:00
admin moved this to Closed in skato-ansible debugging on 2026-01-03 13:53:15 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Total Time Spent: 23 minutes
admin
23 minutes
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/skato-ansible#7