コード例 #1
0
ファイル: clang_server.py プロジェクト: BruceZu/nuclide
    def get_declaration_info_for_cursor(self, cursor):
        '''Returns string id in clang-callgraph-service format for entity under the
        cursor. Currently works only for definitions of class methods, instance
        methods and functions. Returns None for everything else.
        '''
        result = []
        while cursor is not None and not cursor.kind.is_translation_unit():
            file = cursor.location.file
            result.append({
                'name': self.get_name_for_cursor(cursor),
                'type': cursor.kind.name,
                'cursor_usr': cursor.get_usr(),
                'file': resolve_file(file),
            })
            cursor = cursor.semantic_parent

        return result
コード例 #2
0
    def get_declaration_info_for_cursor(self, cursor):
        '''Returns string id in clang-callgraph-service format for entity under the
        cursor. Currently works only for definitions of class methods, instance
        methods and functions. Returns None for everything else.
        '''
        result = []
        while cursor is not None and not cursor.kind.is_translation_unit():
            file = cursor.location.file
            result.append({
                'name': self.get_name_for_cursor(cursor),
                'type': cursor.kind.name,
                'cursor_usr': cursor.get_usr(),
                'file': resolve_file(file),
            })
            cursor = cursor.semantic_parent

        return result
コード例 #3
0
 def __resolve_file(self, file_name):
     return resolve_file(file_name, self._base_config_dir)
コード例 #4
0
 def __resolve_file(self, file_name):
     return resolve_file(file_name, self._base_config_dir)
コード例 #5
0
    default_args=default_args,
    description="Test base job operator",
    schedule_interval=None,
    catchup=False,
)

basepath = os.path.dirname(__file__)
template_path = "templates"

envs = {
    "PASS_ARG": "a test",
}

KubernetesJobOperator(
    task_id="test-job-custom-success",
    body_filepath=resolve_file("./.local/test_custom.success.yaml"),
    envs=envs,
    dag=dag,
)

KubernetesJobOperator(
    task_id="test-job-custom-fail",
    body_filepath=resolve_file("./.local/test_custom.fail.yaml"),
    envs=envs,
    dag=dag,
)

if __name__ == "__main__":
    dag.clear(reset_dag_runs=True)
    dag.run()
コード例 #6
0
from airflow_kubernetes_job_operator.kubernetes_job_operator import KubernetesJobOperator

dag = DAG(
    "kub-job-op-long",
    default_args=default_args,
    description="Test base job operator",
    schedule_interval=None,
    catchup=False,
)

envs = {
    "PASS_ARG": "a test",
}

total_time_seconds = round(timedelta(hours=8).total_seconds())

KubernetesJobOperator(
    task_id="test-long-job-success",
    body_filepath=resolve_file("./templates/test_long_job.yaml"),
    envs={
        "PASS_ARG": "a long test",
        "TIC_COUNT": str(total_time_seconds),
    },
    dag=dag,
)


if __name__ == "__main__":
    dag.clear(reset_dag_runs=True)
    dag.run()
コード例 #7
0
def pkcs12_fingerprint_local(pfx_file, password, base_dir):
    return pkcs12_fingerprint(resolve_file(pfx_file, base_dir), password)