Skip to content

Remove comment in code snippets #3

Description

@julia05

The code snippets saved in the database still include the comment with metadata at the top of the code.
E.g.:

"""
github_link: https://github.com/faucamp/python-gsmmodem/blob/834c68b1387ca2c91e2210faa8f75526b39723b5/test/test_pdu.py
repository:
    repo_id: 8180126
    url: https://github.com/faucamp/python-gsmmodem
    language: SOURCE_PY_3
    is_fork: false
    fork_count: 261
    stargazer_count: 325
focal_class:
    identifier: TestUdhPortAddress
    superclass: [unittest.TestCase.]
    fields: []
    methods: [setUp,test_encode,test_decode]
    file: test/test_pdu.py
focal_method:
    identifier: test_encode
    method_hash: -1972688544
parser_specifics:
    input_name: portIe
    cfg_input_node_id: 2
    cfg_parsing_nodes: [node 6, node 9]
    cfg_supporting_nodes: [node 2, node 6, node 9]
    method_hash: -1972688544
Statements in Parser: 2
"""
import random
from . import compat
import gsmmodem.pdu
from gsmmodem.util import SimpleOffsetTzInfo
import codecs
from datetime import datetime
import unittest
import sys
from datetime import timedelta
from __future__ import unicode_literals
import pickle

...

It needs to be checked if all the metadata information contained in the comment is already saved in the metadata of the Slice table in the database. If necessary, missing information need to be added in the database and then the comment can be removed before saving it in the database.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions