René's URL Explorer Experiment


Title: od: Extend physical conversion to integer factors, fix typing by acolomb · Pull Request #673 · canopen-python/canopen · GitHub

Open Graph Title: od: Extend physical conversion to integer factors, fix typing by acolomb · Pull Request #673 · canopen-python/canopen

X Title: od: Extend physical conversion to integer factors, fix typing by acolomb · Pull Request #673 · canopen-python/canopen

Description: The Variable.phys property docstring mentions "Non integers will be passed as is." That is correct, but not reflected in the type hints for the associated ODVariable.encode_phys() / .decode_phys() functions. Extend the return / argument type to all possible internal data types, instead of plain int. Try factor conversion on all NUMBER_TYPES, where it was previously limited to INTEGER_TYPES. Only apply rounding in encode_phys() if the variable's data type is actually integer-based. Allow integer factors in type hint for ODVariable.factor. There is nothing wrong with using integer factors to yield integers when decoding. For encoding, the division may still result in a float, while the rounding behavior is kept unchanged for integer-typed variables. Thus, try to parse integer factors as integers from EDS files, not forcing to a float. Related comment first given here: #651 (comment)

Open Graph Description: The Variable.phys property docstring mentions "Non integers will be passed as is." That is correct, but not reflected in the type hints for the associated ODVariable.encode_phys() / .dec...

X Description: The Variable.phys property docstring mentions "Non integers will be passed as is." That is correct, but not reflected in the type hints for the associated ODVariable.encode_phys(...

Opengraph URL: https://github.com/canopen-python/canopen/pull/673

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:9de977aa-eed0-97bf-b999-e17712f19259
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8CF8:1CEF06:231CE1:2F17FE:6A5ECA9D
html-safe-nonced077ddf4955e850139b7c4c05dfb4cf4dd25eabcba3a045d109ee62e4124f599
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Q0Y4OjFDRUYwNjoyMzFDRTE6MkYxN0ZFOjZBNUVDQTlEIiwidmlzaXRvcl9pZCI6IjQ5OTk2NzIwMDY4NjAyNjIwNDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaca629082db354ad0db9157d40f903521ab6cf3b270b08f3bd79b7254bbde00951
hovercard-subject-tagpull_request:3806024180
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/canopen-python/canopen/pull/673/files
twitter:imagehttps://avatars.githubusercontent.com/u/6996887?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/6996887?s=400&v=4
og:image:altThe Variable.phys property docstring mentions "Non integers will be passed as is." That is correct, but not reflected in the type hints for the associated ODVariable.encode_phys() / .dec...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None9bd00899c80f8b6ea4e7a96c99290af4722b0befdf9e021b19232cbd6f993660
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/canopen-python/canopen git https://github.com/canopen-python/canopen.git
octolytics-dimension-user_id200581454
octolytics-dimension-user_logincanopen-python
octolytics-dimension-repository_id68737600
octolytics-dimension-repository_nwocanopen-python/canopen
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id68737600
octolytics-dimension-repository_network_root_nwocanopen-python/canopen
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9996307881fdf9017d864a20b3dfe5aae4dddd3e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/canopen-python/canopen/pull/673/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcanopen-python%2Fcanopen%2Fpull%2F673%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcanopen-python%2Fcanopen%2Fpull%2F673%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=canopen-python%2Fcanopen
Reloadhttps://github.com/canopen-python/canopen/pull/673/files
Reloadhttps://github.com/canopen-python/canopen/pull/673/files
Reloadhttps://github.com/canopen-python/canopen/pull/673/files
Please reload this pagehttps://github.com/canopen-python/canopen/pull/673/files
canopen-python https://github.com/canopen-python
canopenhttps://github.com/canopen-python/canopen
Notifications https://github.com/login?return_to=%2Fcanopen-python%2Fcanopen
Fork 359 https://github.com/login?return_to=%2Fcanopen-python%2Fcanopen
Star 561 https://github.com/login?return_to=%2Fcanopen-python%2Fcanopen
Code https://github.com/canopen-python/canopen
Issues 53 https://github.com/canopen-python/canopen/issues
Pull requests 20 https://github.com/canopen-python/canopen/pulls
Discussions https://github.com/canopen-python/canopen/discussions
Actions https://github.com/canopen-python/canopen/actions
Projects https://github.com/canopen-python/canopen/projects
Security and quality 0 https://github.com/canopen-python/canopen/security
Insights https://github.com/canopen-python/canopen/pulse
Code https://github.com/canopen-python/canopen
Issues https://github.com/canopen-python/canopen/issues
Pull requests https://github.com/canopen-python/canopen/pulls
Discussions https://github.com/canopen-python/canopen/discussions
Actions https://github.com/canopen-python/canopen/actions
Projects https://github.com/canopen-python/canopen/projects
Security and quality https://github.com/canopen-python/canopen/security
Insights https://github.com/canopen-python/canopen/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fcanopen-python%2Fcanopen%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcanopen-python%2Fcanopen%2Fissues%2Fnew%2Fchoose
acolombhttps://github.com/acolomb
canopen-python:masterhttps://github.com/canopen-python/canopen/tree/master
acolomb:phys-passthroughhttps://github.com/acolomb/canopen/tree/phys-passthrough
Conversation 10 https://github.com/canopen-python/canopen/pull/673
Commits 8 https://github.com/canopen-python/canopen/pull/673/commits
Checks 5 https://github.com/canopen-python/canopen/pull/673/checks
Files changed https://github.com/canopen-python/canopen/pull/673/files
Please reload this pagehttps://github.com/canopen-python/canopen/pull/673/files
od: Extend physical conversion to integer factors, fix typing https://github.com/canopen-python/canopen/pull/673/files#top
Show all changes 8 commits https://github.com/canopen-python/canopen/pull/673/files
4ed62ae Fix type handling for physical variable representation. acolomb Jun 4, 2026 https://github.com/canopen-python/canopen/pull/673/commits/4ed62aebeb1f1af219670243fcc4b72da7836e57
5aec961 Extend physical conversion to float types. acolomb Jun 4, 2026 https://github.com/canopen-python/canopen/pull/673/commits/5aec9612b4549eadeb8d6bc98154d8a3c77e1f81
af462c9 Allow integer factors for physical representation. acolomb Jun 4, 2026 https://github.com/canopen-python/canopen/pull/673/commits/af462c99549de92b15541d10a621f10b59e559ad
aa8a166 Accept integer Factor= settings from EDS. acolomb Jun 4, 2026 https://github.com/canopen-python/canopen/pull/673/commits/aa8a166c551e20eb49df59ae92a86f5a87cea142
9ad88a7 Test integer factors. acolomb Jun 4, 2026 https://github.com/canopen-python/canopen/pull/673/commits/9ad88a74baf71075480d19a677c63a2566bc5118
b556966 Test integer factor in EDS. acolomb Jun 4, 2026 https://github.com/canopen-python/canopen/pull/673/commits/b556966662fc63cdd2f256446934f44ac734c23d
eb85634 Test real32 and pass-through of non-numeric variables. acolomb Jun 4, 2026 https://github.com/canopen-python/canopen/pull/673/commits/eb8563475625062221c93d010d8ee2e71e3cf16d
f1838f3 suggested changes from review bizfsc Jun 24, 2026 https://github.com/canopen-python/canopen/pull/673/commits/f1838f35566df218af4d47fec603401050f02243
Clear filters https://github.com/canopen-python/canopen/pull/673/files
Please reload this pagehttps://github.com/canopen-python/canopen/pull/673/files
Please reload this pagehttps://github.com/canopen-python/canopen/pull/673/files
__init__.py https://github.com/canopen-python/canopen/pull/673/files#diff-69b2a4d11d72cfc4d3666514a69b5297dc82d81ea45ccc0923d3c7361cd68c5f
eds.py https://github.com/canopen-python/canopen/pull/673/files#diff-65e16349104aac0db9004b6c4f118415792a9f44defe3f38c635c781d4d94b71
sample.eds https://github.com/canopen-python/canopen/pull/673/files#diff-4d0e307510737b94053c2f3c6d749895e0f1fd2ab5e5fc39ff8689992d39a82b
test_eds.py https://github.com/canopen-python/canopen/pull/673/files#diff-339c7b9661df8e48adc88d28d953a955f16dae569fe46c3e027181fe533e0bbf
test_od.py https://github.com/canopen-python/canopen/pull/673/files#diff-0067197268d72b1ee379b0df2f36d1bcd4633e9bde7a9e42660074513ffdb28a
canopen/objectdictionary/__init__.pyhttps://github.com/canopen-python/canopen/pull/673/files#diff-69b2a4d11d72cfc4d3666514a69b5297dc82d81ea45ccc0923d3c7361cd68c5f
View file https://github.com/canopen-python/canopen/blob/f1838f35566df218af4d47fec603401050f02243/canopen/objectdictionary/__init__.py
Open in desktop https://desktop.github.com
bizfschttps://github.com/bizfsc
Jun 24, 2026https://github.com/canopen-python/canopen/pull/673/files#r3465636910
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/canopen-python/canopen/pull/673/files
acolombhttps://github.com/acolomb
Jun 25, 2026https://github.com/canopen-python/canopen/pull/673/files#r3477189039
Please reload this pagehttps://github.com/canopen-python/canopen/pull/673/files
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/canopen-python/canopen/pull/673/files
https://github.co/hiddenchars
https://github.com/canopen-python/canopen/pull/673/{{ revealButtonHref }}
https://github.com/canopen-python/canopen/pull/673/files#diff-69b2a4d11d72cfc4d3666514a69b5297dc82d81ea45ccc0923d3c7361cd68c5f
https://github.com/canopen-python/canopen/pull/673/files#diff-69b2a4d11d72cfc4d3666514a69b5297dc82d81ea45ccc0923d3c7361cd68c5f
https://github.com/canopen-python/canopen/pull/673/files#diff-69b2a4d11d72cfc4d3666514a69b5297dc82d81ea45ccc0923d3c7361cd68c5f
https://github.com/canopen-python/canopen/pull/673/files#diff-69b2a4d11d72cfc4d3666514a69b5297dc82d81ea45ccc0923d3c7361cd68c5f
https://github.com/canopen-python/canopen/pull/673/files#diff-69b2a4d11d72cfc4d3666514a69b5297dc82d81ea45ccc0923d3c7361cd68c5f
https://github.com/canopen-python/canopen/pull/673/files#diff-69b2a4d11d72cfc4d3666514a69b5297dc82d81ea45ccc0923d3c7361cd68c5f
canopen/objectdictionary/eds.pyhttps://github.com/canopen-python/canopen/pull/673/files#diff-65e16349104aac0db9004b6c4f118415792a9f44defe3f38c635c781d4d94b71
View file https://github.com/canopen-python/canopen/blob/f1838f35566df218af4d47fec603401050f02243/canopen/objectdictionary/eds.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/canopen-python/canopen/pull/673/{{ revealButtonHref }}
https://github.com/canopen-python/canopen/pull/673/files#diff-65e16349104aac0db9004b6c4f118415792a9f44defe3f38c635c781d4d94b71
https://github.com/canopen-python/canopen/pull/673/files#diff-65e16349104aac0db9004b6c4f118415792a9f44defe3f38c635c781d4d94b71
test/sample.edshttps://github.com/canopen-python/canopen/pull/673/files#diff-4d0e307510737b94053c2f3c6d749895e0f1fd2ab5e5fc39ff8689992d39a82b
View file https://github.com/canopen-python/canopen/blob/f1838f35566df218af4d47fec603401050f02243/test/sample.eds
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/canopen-python/canopen/pull/673/{{ revealButtonHref }}
https://github.com/canopen-python/canopen/pull/673/files#diff-4d0e307510737b94053c2f3c6d749895e0f1fd2ab5e5fc39ff8689992d39a82b
https://github.com/canopen-python/canopen/pull/673/files#diff-4d0e307510737b94053c2f3c6d749895e0f1fd2ab5e5fc39ff8689992d39a82b
https://github.com/canopen-python/canopen/pull/673/files#diff-4d0e307510737b94053c2f3c6d749895e0f1fd2ab5e5fc39ff8689992d39a82b
test/test_eds.pyhttps://github.com/canopen-python/canopen/pull/673/files#diff-339c7b9661df8e48adc88d28d953a955f16dae569fe46c3e027181fe533e0bbf
View file https://github.com/canopen-python/canopen/blob/f1838f35566df218af4d47fec603401050f02243/test/test_eds.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/canopen-python/canopen/pull/673/{{ revealButtonHref }}
https://github.com/canopen-python/canopen/pull/673/files#diff-339c7b9661df8e48adc88d28d953a955f16dae569fe46c3e027181fe533e0bbf
https://github.com/canopen-python/canopen/pull/673/files#diff-339c7b9661df8e48adc88d28d953a955f16dae569fe46c3e027181fe533e0bbf
test/test_od.pyhttps://github.com/canopen-python/canopen/pull/673/files#diff-0067197268d72b1ee379b0df2f36d1bcd4633e9bde7a9e42660074513ffdb28a
View file https://github.com/canopen-python/canopen/blob/f1838f35566df218af4d47fec603401050f02243/test/test_od.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/canopen-python/canopen/pull/673/{{ revealButtonHref }}
https://github.com/canopen-python/canopen/pull/673/files#diff-0067197268d72b1ee379b0df2f36d1bcd4633e9bde7a9e42660074513ffdb28a
https://github.com/canopen-python/canopen/pull/673/files#diff-0067197268d72b1ee379b0df2f36d1bcd4633e9bde7a9e42660074513ffdb28a
https://github.com/canopen-python/canopen/pull/673/files#diff-0067197268d72b1ee379b0df2f36d1bcd4633e9bde7a9e42660074513ffdb28a
Please reload this pagehttps://github.com/canopen-python/canopen/pull/673/files
https://github.com/canopen-python/canopen/pull/673/files#diff-0067197268d72b1ee379b0df2f36d1bcd4633e9bde7a9e42660074513ffdb28a
Please reload this pagehttps://github.com/canopen-python/canopen/pull/673/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.