PyCharm: Deleting/Modifying returned arguments (refactoring) - refactoring

I am trying to remove some of the returned arguments of a function called at multiple places in my working pipeline with PyCharm. PyCharm allows me to do this only for input arguments (via Refactoring -> Change Signature) but I am struggling to find a way to automatically do the same for returned arguments.
So far, my only solution is to find the usages of the function and to delete by hand the output parameters at every single call...
I will be happy if anyone can help.
I am using PyCharm Community Edition 2016.3.2

Related

IzPack 5.1 - use user input variables in bash script without substitution

Hopefully someone could help me here with following problem – tried to find a solution for this for weeks but unfortunately wasn’t able to find one.
I am using IzPack (recently updated to 5.1) as an installer for a software package. This package contains multiple executable files (bash scripts) which use variables inside. These variables are filled with values provided by the user during the installation process (user input panel).
The problem I have is that all these values get substituted in the bash-file if it is marked as “parsable” – otherwise (if not marked as “parsable”) the values are not substituted but it is not possible to access them during script execution. I have to access the values of these variables but it is no option for me to substitute them in the bash scripts because these files are not deleted after the installation is done and have to stay on the disk. In case of variable substitution all variables, also passwords, are substituted and could be seen by everybody, having read access to the file, in plaintext.
Has anyone got a solution or idea how this could be achieved using izPack? I also thought about encrypting the passwords – there exists a processor for it in izPack but unfortunately no documentation.
Thanks in advance
How about sanitizing or removing the files in question using the ProcessPanel?
This is typically run after the InstallPanel and before the installation is finished.

How to pass TFS Build number as argument in PowerShell

I have a powershell script in Visual Studio Build, and I wanted to get the build number to be passed as argument.
Using the below arguments, this doesnt pass the build number but it passes as a literal word.
Please help in getting the build number to be passed as argument. Thank you in advance.
I'm using TFS 2015.
I have already solved this issue. I created a new variable in the variables tab and pass the value of the build number.
And then I set it as an argument in the PowerShell script.
This solves my problem :)

From bash get list of currently opened tabs in a Chromium process

From bash, I would like a command (or function) that I can use to get a list (one per line) of URLs that are currently opened in a Chromium window.
I have seen a similar question here, but I think it requires creating an extension? If creating extension is only way, can you please give explicit instructions (ideally a bash script that creates the required extension)?

Why does Powershell search every directory within one's $PATH for a PSConsoleHostReadLine file?

all!
I noticed that Powershell, or more specifically, pasting and tab-completing within Powershell, was a lot slower on my machine after upgrading to v3 from v2. I opened up procmon to see what was going on, only to find out that every attempt to tab-complete or paste anything triggers Powershell to find various permutations of the file provided in the subject. I have some network folders in my $PATH and walking through those folders every time I paste something seems non-ideal.
It seems that this file allows Powershell to behave more like Bash. While this is absolutely FANTASTIC and I'm looking forward to abusing this feature in the very near future, is there any way to configure Powershell such that it only attempts to find this file in one directory?
Thanks!
PSConsoleHostReadLine is actually a function. If PoSH can't find a method, alias, or anything else executable with that name, it falls back to it's default 'cooked' readline with editing, etc.
To redefine it, create a function:
function PSConsoleHostReadline {
[Console]::Readline()
}
As written, this method disables editing, etc. Write your own insane magic to do whatever you wish.
I'm guessing it's searching all the extra locations due to Powershell 3 having "Module Auto Load" which checks for a function in all locations known in the ENV:PSModulePath, and auto-loads the module which contains said method.
This was an oversight in V3. V4 will only search for functions or aliases - it won't search for external exes when looking for PSConsoleHostReadline.
If you're looking for a bash like experience - check out https://github.com/lzybkr/PSReadLine

Getting an IVsTextLines from file path

I've written a basic LanguageService extension for Visual Studio 2008 for my studio's proprietary scripting language. It works perfectly fine, and I've implemented a basic symbol table to keep track of script definitions and calls allowing for goto definition functionality.
The problem I've run into is that I only know how to parse the current active view, and I'd like to scan the entire solution's contents so that the user can goto the definition of a script defined in a file they have yet to open and have parsed. I've figured out how to generate a list of all files in the solution, but now I need to create a new Microsoft.VisualStudio.Package.Source which requires a Microsoft.VisualStudio.TextManager.Interop.IVsTextLines and I have no idea how to create a new one based off of the file I have.
Maybe I'm going about the problem the wrong way and someone can point me towards a better way to cause a file to be parsed by the LanguageService.
Regards,
Colin
Poking around I found that the reason Visual Studio needs a new Source is that it's keeping an internal list of them, and they're like the view into the text file held by the editor.
I came to the conclusion that files that are closed do not need IVsTextLines or to be entered into the VS internal list of Source files because I'm not doing any operations directly on them, all I care about in this case is to build a table of symbols and their corresponding TextSpan. So instead I created a new API for my parser that just took in a string and built my AST instead of grabbing the text from a ParseRequest, and only worried about specific types of symbols I needed to record. I then pushed this into a BackgroundWorker.
So I guess I was going about the problem in the wrong way. Although it does seem weird I can't just trigger a file to be opened into the Source list.
Interestingly I asked this question to Microsoft on their support forums and they advised me I had to purchase some service and support plan for them to answer my question.

Resources