Skip to content

Fix typos in src/hal directory#3253

Merged
andypugh merged 2 commits intoLinuxCNC:masterfrom
luzpaz:typos-src-hal
Feb 2, 2025
Merged

Fix typos in src/hal directory#3253
andypugh merged 2 commits intoLinuxCNC:masterfrom
luzpaz:typos-src-hal

Conversation

@luzpaz
Copy link
Contributor

@luzpaz luzpaz commented Jan 7, 2025

Found via codespell -q 3 -S "*.po,*.pot,*.svg,*.ts,*.changes_es,./.git/logs,./share,./docs/man/es,./configs/attic,*_fr.*,*_es.*,README_es,./src/hal/classicladder" -L abd,alle,ans,apoints,atleast,ba,breal,bu,bulle,busses,checke,childs,collet,comando,commutated,componentes,currenty,dashs,doubleclick,dout,dum,etxt,extint,faktor,finis,fo,fpr,halp,ihs,indx,ine,inout,inport,ist,leadin,momento,mot,nce,nome,oder,ontext,ot,parm,parms,propertys,realy,rin,ro,seh,sems,ser,serie,splitted,smoe,tabl,te,tey,tre,trough,ue,ure,usin,varn,vell,wille,wont,wonte

Quick question: I found these source typos

PyRun_SimpleString("pyui.intilize = pyui.instance.build(2)\n");
}else if (dbg == 1){
PyRun_SimpleString("pyui.intilize = pyui.instance.build(1)\n");
}else{
PyRun_SimpleString("pyui.intilize = pyui.instance.build(0)\n");

(intilize->initialize) but didn't include them. Please advise.

Found via `codespell -q 3 -S "*.po,*.pot,*.svg,*.ts,*.changes_es,./.git/logs,./share,./docs/man/es,./configs/attic,*_fr.*,*_es.*,README_es,./src/hal/classicladder" -L abd,alle,ans,apoints,atleast,ba,breal,bu,bulle,busses,checke,childs,collet,comando,commutated,componentes,currenty,dashs,doubleclick,dout,dum,etxt,extint,faktor,finis,fo,fpr,halp,ihs,indx,ine,inout,inport,ist,leadin,momento,mot,nce,nome,oder,ontext,ot,parm,parms,propertys,realy,rin,ro,seh,sems,ser,serie,splitted,smoe,tabl,te,tey,tre,trough,ue,ure,usin,varn,vell,wille,wont,wonte`
@andypugh
Copy link
Collaborator

andypugh commented Jan 7, 2025

@c-morley can you look at the pyui.intilize code?
It is probably creating a python variable that doesn't seem to be used anywhere, so redundant code. Or it may be a bug. I don't see pyui.intilize or pyui.initialize anywhere else in the code.

@andypugh andypugh requested a review from c-morley January 7, 2025 12:33
@c-morley
Copy link
Collaborator

c-morley commented Jan 8, 2025

yes 'pyui.intilize = pyui.instance.build(2)' can be shortened to 'pyui.instance.build(2)'
etc.

@luzpaz
Copy link
Contributor Author

luzpaz commented Jan 28, 2025

please advise?

@smoe
Copy link
Collaborator

smoe commented Jan 31, 2025

please advise?

How I read it, the newly generated otherwise unused variable "pyui.initilize" catches the return variable of the function "pyui.instance.build()". So, instead of executing the assignment "newvar = somefunction(X)" for which somefunction(X) was executed, the suggestion is to only write "somefunction(X)" and thus only execute the function but ignore its return value.

In other words: You can happily remove all occurrences of "pyui.intilize = " from the code.

@c-morley
Copy link
Collaborator

c-morley commented Feb 1, 2025

Yes exactly - sorry for not being clearer.

@luzpaz
Copy link
Contributor Author

luzpaz commented Feb 1, 2025

In other words: You can happily remove all occurrences of "pyui.intilize = " from the code.

Should I include that in this PR or spin it off into a separate one ?

@andypugh
Copy link
Collaborator

andypugh commented Feb 1, 2025

As far as I am concerned you can put it in this one.

@luzpaz
Copy link
Contributor Author

luzpaz commented Feb 2, 2025

Done, please review. Do you want me to squash or --amend the git history ?

@andypugh andypugh merged commit e90045c into LinuxCNC:master Feb 2, 2025
10 checks passed
@andypugh
Copy link
Collaborator

andypugh commented Feb 2, 2025

I merged them as two separate commits. I considered merging but decided it was a cleaner commit history if they stayed separate.

@luzpaz luzpaz deleted the typos-src-hal branch February 2, 2025 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants