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

dir on a struct instance does not return all public APIs #311

Closed
timkpaine opened this issue Jul 1, 2024 · 0 comments · Fixed by #335
Closed

dir on a struct instance does not return all public APIs #311

timkpaine opened this issue Jul 1, 2024 · 0 comments · Fixed by #335
Labels
type: enhancement Issues and PRs related to improvements to existing features

Comments

@timkpaine
Copy link
Member

related to #82

from csp import Struct

class Test(Struct):
    x: int

dir(Test())  # ['x']

Missing at least:

  • all_fields_set
  • clear
  • collectts
  • copy
  • copy_from
  • deepcopy
  • deepcopy_from
  • metadata (note: classmethod)
  • to_dict
  • to_json
  • to_yaml
  • update
  • update_from
  • And possible more, like dunders for __metadata__, __annotations__, __defaults__, __full_metadata__, __full_metadata_typed__
@timkpaine timkpaine added the type: enhancement Issues and PRs related to improvements to existing features label Jul 1, 2024
ptomecek added a commit that referenced this issue Jul 15, 2024
ptomecek added a commit that referenced this issue Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Issues and PRs related to improvements to existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant