In many cases, "smarty-pants" is a sarcasm. It is used to refer to the people who think they are very smart, but only as a result of their own over-confidence. It is mild, not very pejorative.
But we need to put it in its context to see if it is really a sarcasm or a compliment. It depends on the tone, and who said it. "You bastard!" may be a compliments from an old friend; while it may be very offensive from a stranger.
I would suggest when you are not sure, confront the person with a neutral question. For example:
A: You are such a smarty-pants!
B: Seriouly, what do you think about my idea?
A: I think it is a great idea!
A: You are such a smarty-pants!
B: Seriouly, what do you think about my idea?
A: I think we can come up something better.
Again, observe the tone and other non-verbal languages, and you will know what the person really means.
Hope it helps.
But we need to put it in its context to see if it is really a sarcasm or a compliment. It depends on the tone, and who said it. "You bastard!" may be a compliments from an old friend; while it may be very offensive from a stranger.
I would suggest when you are not sure, confront the person with a neutral question. For example:
A: You are such a smarty-pants!
B: Seriouly, what do you think about my idea?
A: I think it is a great idea!
A: You are such a smarty-pants!
B: Seriouly, what do you think about my idea?
A: I think we can come up something better.
Again, observe the tone and other non-verbal languages, and you will know what the person really means.
Hope it helps.