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

docs: userconfig Examples use a non existent "get" method #1542

Closed
sanzoghenzo opened this issue Jun 14, 2022 · 5 comments · Fixed by #1848
Closed

docs: userconfig Examples use a non existent "get" method #1542

sanzoghenzo opened this issue Jun 14, 2022 · 5 comments · Fixed by #1848
Labels
Enhancement Enhancement request [class->Improved #{number}: {title}] Python API Issues related to pyrevit as a python module [subsystem]

Comments

@sanzoghenzo
Copy link
Contributor

Describe the bug
userconfig.py docstrings have Examples - like this line - that use a get method, but this method does not exist neither in PyRevitConfig nor in PyRevitConfigSectionParser.

The proper method should be get_option.

@jmcouffin
Copy link
Contributor

it might be deprecated.
I use the following on a regular basis

# Grab data from config
my_config = script.get_config()
tests = getattr(my_config, "tests")

from the configparser module
image

https://github.com/eirannejad/pyRevit/blob/4b84aa1bf6608d9a5f6c023d4446006a7a5dbcfd/pyrevitlib/pyrevit/coreutils/configparser.py#L32

@sanzoghenzo
Copy link
Contributor Author

This is what get_option does a few lines below, calling __gettatr__ and optionally handling a default value.
I don't think it should be deprecated, just updated.
I'll put up a PR when I'll have the time!

@eirannejad eirannejad added Enhancement Enhancement request [class->Improved #{number}: {title}] Python API Issues related to pyrevit as a python module [subsystem] labels Sep 4, 2022
@jmcouffin jmcouffin added the Closed Old Issue Issue older than a year. Thanks for pointing it out. If you feel it is still relevant, feel free to label Jun 13, 2023
@sanzoghenzo
Copy link
Contributor Author

Forgive me if I didn't do what I promised, but this is still relevant and hasn't been fixed by anyone.

@jmcouffin jmcouffin removed the Closed Old Issue Issue older than a year. Thanks for pointing it out. If you feel it is still relevant, feel free to label Jun 13, 2023
@jmcouffin
Copy link
Contributor

Forgive me if I didn't do what I promised, but this is still relevant and hasn't been fixed by anyone.
Fine
Then let's get to it ;p @sanzoghenzo

I have been batch closing every single old issue.
Having 250+ issues to deal with does not make sense for a very small number of contributors

@jmcouffin jmcouffin reopened this Jun 13, 2023
sanzoghenzo added a commit to sanzoghenzo/pyRevit that referenced this issue Jun 19, 2023
@jmcouffin jmcouffin linked a pull request Jun 19, 2023 that will close this issue
@jmcouffin
Copy link
Contributor

Thanks for the contribution @sanzoghenzo
Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Enhancement request [class->Improved #{number}: {title}] Python API Issues related to pyrevit as a python module [subsystem]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants