Merged
Conversation
super('クラス名', self)としてたのはsuper()でいいみたいなので省略形を使うことに
Owner
Author
|
pythonコマンドのサンプルはこれ 新しいファイルを作成する際はこれを一番上に持ってくる クラス定義部分 新コマンド作成の際の変更点は以下
あとは動作させたいコマンドをdoメソッド内に書く 今までとの違いは, 表示名の設定方法が変わるのとsuper()の中を変える必要が無いこと |
実行しているWindow.pyから見たパスでよかった
ファイル分割化でのリロードを実装 0個のコマンドの時にエラーが出るのは今まで通りであるが無視(多分気にしなくていい)
PR頂いたときに別スレッドで渡してるから大丈夫だとか適当に言ってしまったが影響あるみたい... とりあえずdisableにして防ぐ
Owner
Author
|
Wikiの方へ新しいコマンドの作成方法を追記したのでそちらを参照してください "ver 1.0(リリース版)以降"のセクションが本PR(およびそれ以降の修正)の変更部分です |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
既存のコマンドはPythonCommand.py下にずら~っと書いてたがこれを変更
メリット
少なくともずら~よりは...?
コミットオプションで変更できるらしいが面倒
デメリット
これのマージ後は既存で使っている人のコマンドがそのままでは使えない
移行するメリットが薄ければ廃止or別方法を検討するかもしれない
移行法なども実装が進んできたらまとめて書きたい